A heading with class="example" in div

A paragraph with class="example" in div.

Another paragraph with class="example" in div.

Click the button to find out how many elements with class "example" there are in DIV.

Note: The querySelectorAll() method is not supported in Internet Explorer 8 and earlier versions.